<?php
/**
 * Each engineer has a duty to keep the code elegant
 * Created by wolffy.
 * Author @wolffy<13750088090@sina.cn>
 * Date: 2018/12/12
 * Time: 13:51
 */
namespace App\Services\BackendApi;


use App\Repositories\PersonalAccountWithdrawRepository;

class PersonalAccountService extends CommonService
{
    protected $personalAccountWithdrawRepository;


    public function __construct(PersonalAccountWithdrawRepository $personalAccountWithdrawRepository)
    {
        parent::__construct();
        $this->personalAccountWithdrawRepository = $personalAccountWithdrawRepository;
    }

    public function getList($request)
    {
        if ($request['start_time'] > $request['end_time']) {
            return $this->responseJson(1010000);//开始时间大于结束时间
        }
        $data = $this->personalAccountWithdrawRepository->getList($request);
        return $this->responseJson(0, $data);
    }
}